package com.kingkim.electromechanical.commonutils.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import java.util.HashMap;
import java.util.Map;

@Controller
public class RedirectFTL {


    @RequestMapping("/redirectDir/{ftlName1}/{ftlName2}")
    public ModelAndView RedirectDir(@PathVariable String ftlName1,@PathVariable String ftlName2){
        Map map = new HashMap();
        return   new ModelAndView(ftlName1+"/"+ftlName2,map);
    }

    @RequestMapping("/redirectPage/{ftlName1}")
    public ModelAndView RedirectPage(@PathVariable String ftlName1){
        Map map = new HashMap();
        return   new ModelAndView(ftlName1, map);
    }
}
